from rest_framework.pagination import LimitOffsetPagination, PageNumberPagination


class ArticleLimitOffsetPagination(LimitOffsetPagination):
    # 每页三条数据
    default_limit = 3
    # 每页最大条数100条数
    max_limit = 100


class ArticlePageNumberPagination(PageNumberPagination):
    # 每页条数
    page_size = 2
    # page_query_param = "page" #默认page 进行分页
    page_size_query_param = "size"  # 每页显示多少条
    max_page_size = 100  # 每页最大条数